
package com.yonyou.test.springTest;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
//@Component
public class Config {

    @Bean
    public SimpleBean simpleBean() {
        return new SimpleBean();
    }

    @Bean
    public SimpleBeanConsumer simpleBeanConsumer() {
    	SimpleBeanConsumer simpel = new SimpleBeanConsumer(simpleBean());
        System.out.println(simpel.getSimpleBean());
        SimpleBeanConsumer simpel2 = new SimpleBeanConsumer(simpleBean());
        System.out.println(simpel2.getSimpleBean());
    	return simpel;
    }
}
